'''user_list = [
    {"name": "张三", "age": 22, "title": "测试工程师"},
    {"name": "李四", "age": 24, "title": "开发工程师"},
    {"name": "王五", "age": 21, "title": "测试工程师"},
]
age_list = []
for i in user_list:
    age_list.append(i.get("age"))
age_list.sort()
# print(age_list)

for i in age_list:
    for j in user_list:
        if i == j.get("age"):
            print(j)

user_list.sort(key=lambda x:x.get("age"))
print(user_list)
'''


'''
try:
    data = int(input("请输入数据："))
    print(data)
except Exception as e:
    print(f"提示输入的错误: {e}")
else:
    if data % 2 == 0:
        print("偶数")
    else:
        print("奇数")
finally:
    print("程序运行结束")
'''


def input_password():
    password = input("请输入密码：")
    if len(password) < 8:
        ex = Exception("密码长度不够")
        raise ex
    else:
        return  password
try:
    print(input_password())
except Exception as e:
    print(e)

